Systems and methods for transportation mode determination using a magnetometer

ABSTRACT

A method for determining a transportation mode acquires magnetometer and speed data from a mobile device, correlates the magnetometer to the speed data in groupings, and performs spectral analysis on the groups of magnetometer data. Energy calculated for each of a set of frequency components obtained from the spectral analysis is compared to a baseline value to generate a difference, and a transportation mode type is assigned to the vehicle based on the difference.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/220,886, filed Apr. 1, 2021; which is a continuation of U.S. patentapplication Ser. No. 16/542,544, filed Aug. 16, 2019, now U.S. Pat. No.10,993,080, issued on Apr. 27, 2021; which claims the benefit of U.S.Provisional Patent Application No. 62/720,689, filed on Aug. 21, 2018,the contents of which are hereby incorporated by reference in theirentirety.

BACKGROUND OF THE INVENTION

Mobile devices, including smart phones, have been utilized to providelocation information to users. Mobile devices can use a number ofdifferent techniques to produce location data. One example is the use ofGlobal Positioning System (GPS) chipsets, which are now widelyavailable, to produce location information for a mobile device.

In order to use mobile devices to track drivers as they are driving incars, as well as their driving behaviors, it is helpful to determine thetransportation mode of the user of the mobile device as a function oftime, for example, whether the person is driving, riding on a bus,riding on a train, riding on a subway, or the like.

Despite the progress made in relation to providing data related todrivers and their vehicles, there is a need in the art for improvedmethods and systems related to determining modes of transportation thatare utilized by users of mobile devices.

SUMMARY OF THE INVENTION

Embodiments of the present disclosure relate to transportation systems.More particularly, embodiments relate to systems and methods fortransportation mode determination using sensor measurements from amobile device.

According to some embodiments, a method is provided. The method mayinclude operating a magnetometer of a mobile device during a trip in avehicle to acquire magnetometer data with respect to one or morefrequencies. The magnetometer may be included in one or more sensors ofthe mobile device. The method may further include acquiring speed datafrom the mobile device during the trip in the vehicle. The method mayfurther include correlating the magnetometer data to the speed data toseparate the magnetometer data into one or more groupings based on thespeed data. The method may further include performing spectral analysison a magnitude of the magnetometer data for each of the one or moregroupings. The method may further include calculating an energy for eachof the one or more frequencies using the spectral analysis. The methodmay further include comparing the energy for each of the one or morefrequencies to a baseline value to generate a difference. The method mayfurther include assigning a type to the vehicle based on the difference.

According to some embodiments, a system is provided. The system mayinclude a mobile device comprising a plurality of sensors, a memory, anda processor coupled to the memory. The processor may be configured toperform operations including those recited in the methods describedherein.

According to some embodiments, a computer-program product is provided.The computer-program product may be tangibly embodied in anon-transitory machine-readable storage medium of a device. Thecomputer-program product may include instructions that, when executed byone or more processors, cause the one or more processors to performoperations including the steps of the methods described herein.

This summary is not intended to identify key or essential features ofthe claimed subject matter, nor is it intended to be used in isolationto determine the scope of the claimed subject matter. The subject mattershould be understood by reference to appropriate portions of the entirespecification of this patent, any or all drawings, and each claim.

Numerous benefits are achieved by way of the various embodiments overconventional techniques. For example, the various embodiments providemethods and systems for determining a transportation mode utilized by auser of a mobile device. In some embodiments, information acquired bysensors of the mobile device may be analyzed by a processor of themobile device to determine whether the user is likely to be a driver ofa vehicle. If so, the sampling rate of the sensors may be increased toenable determination of driving characteristics. These and otherembodiments along with many of its advantages and features are describedin more detail in conjunction with the text below and attached figures.

The foregoing, together with other features and embodiments, will becomemore apparent upon referring to the following specification, claims, andaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

Illustrative embodiments of the present disclosure are described indetail below with reference to the following drawing figures:

FIG. 1 is a system diagram illustrating a transportation modedetermination system including a mobile device according to someembodiments.

FIG. 2 is a system diagram illustrating a transportation modedetermination system including a server according to some embodiments.

FIG. 3 is an is an architectural diagram illustrating the functionallayers of a mobile device according to some embodiments.

FIG. 4 is a flowchart illustrating a transportation mode determinationmethod according to some embodiments.

FIG. 5 is a plot of power versus frequency components at various speedsof a car as measured by a magnetometer of a mobile device according tosome embodiments.

FIG. 6 is a plot of power versus frequency components at various speedsof a bus as measured by a magnetometer of a mobile device according tosome embodiments.

FIG. 7 is a plot of power versus frequency components at various speedsof a train as measured by a magnetometer of a mobile device according tosome embodiments.

FIG. 8A is a plot of power versus frequency components at a speed rangeof 25 to 35 miles per hour for a car, a bus, and a train as measured bya magnetometer of a mobile device according to some embodiments.

FIG. 8B is a plot of power versus frequency components at a speed rangeof 40 to 50 miles per hour for a car, a bus, and a train as measured bya magnetometer of a mobile device according to some embodiments.

FIG. 8C is a plot of power versus frequency components at a speed rangeof 60 to 70 miles per hour for a car, a bus, and a train as measured bya magnetometer of a mobile device according to some embodiments.

FIG. 9 is a plot illustrating principle component analysis (PCA) offeatures extracted from car and bus trips according to some embodiments.

FIG. 10 is a plot of acceleration versus frequency components for a busat various speeds as measured by an accelerometer of a mobile deviceaccording to some embodiments.

FIG. 11 is a plot of acceleration versus frequency components for a carat various speeds as measured by an accelerometer of a mobile deviceaccording to some embodiments.

FIG. 12 is a plot of acceleration versus frequency components for atrain at various speeds as measured by an accelerometer of a mobiledevice according to some embodiments.

FIG. 13A is a plot of power versus frequency components at a speed rangeof 25 to 35 miles per hour for a car, a bus, and a train as measured bya magnetometer of a mobile device according to some embodiments.

FIG. 13B is a plot of power versus frequency components at a speed rangeof 40 to 50 miles per hour for a car, a bus, and a train as measured bya magnetometer of a mobile device according to some embodiments.

FIG. 13C is a plot of power versus frequency components at a speed rangeof 60 to 70 miles per hour for a car, a bus, and a train as measured bya magnetometer of a mobile device according to some embodiments.

DETAILED DESCRIPTION OF SPECIFIC EMBODIMENTS

Certain aspects and embodiments of this disclosure are provided below.Some of these aspects and embodiments may be applied independently andsome of them may be applied in combination as would be apparent to thoseof skill in the art. In the following description, for the purposes ofexplanation, specific details are set forth in order to provide athorough understanding of embodiments of the invention. However, it willbe apparent that various embodiments may be practiced without thesespecific details. The figures and description are not intended to berestrictive.

The ensuing description provides exemplary embodiments only, and is notintended to limit the scope, applicability, or configuration of thedisclosure. Rather, the ensuing description of the exemplary embodimentswill provide those skilled in the art with an enabling description forimplementing an exemplary embodiment. It should be understood thatvarious changes may be made in the function and arrangement of elementswithout departing from the spirit and scope of the invention as setforth in the appended claims.

Specific details are given in the following description to provide athorough understanding of the embodiments. However, it will beunderstood by one of ordinary skill in the art that the embodiments maybe practiced without these specific details. For example, circuits,systems, networks, processes, and other components may be shown ascomponents in block diagram form in order not to obscure the embodimentsin unnecessary detail. In other instances, well-known circuits,processes, algorithms, structures, and techniques may be shown withoutunnecessary detail in order to avoid obscuring the embodiments.

Also, it is noted that individual embodiments may be described as aprocess which is depicted as a flowchart, a flow diagram, a data flowdiagram, a structure diagram, or a block diagram. Although a flowchartmay describe the operations as a sequential process, many of theoperations can be performed in parallel or concurrently. In addition,the order of the operations may be re-arranged. A process is terminatedwhen its operations are completed, but could have additional steps notincluded in a figure. A process may correspond to a method, a function,a procedure, a subroutine, a subprogram, etc. When a process correspondsto a function, its termination can correspond to a return of thefunction to the calling function or the main function.

The term “computer-readable medium” includes, but is not limited to,portable or non-portable storage devices, optical storage devices, andvarious other mediums capable of storing, containing, or carryinginstruction(s) and/or data. A computer-readable medium may include anon-transitory medium in which data can be stored and that does notinclude carrier waves and/or transitory electronic signals propagatingwirelessly or over wired connections. Examples of a non-transitorymedium may include, but are not limited to, a magnetic disk or tape,optical storage media such as compact disk (CD) or digital versatiledisk (DVD), flash memory, memory or memory devices. A computer-readablemedium may have stored thereon code and/or machine-executableinstructions that may represent a procedure, a function, a subprogram, aprogram, a routine, a subroutine, a module, a software package, a class,or any combination of instructions, data structures, or programstatements. A code segment may be coupled to another code segment or ahardware circuit by passing and/or receiving information, data,arguments, parameters, or memory contents. Information, arguments,parameters, data, etc., may be passed, forwarded, or transmitted via anysuitable means including memory sharing, message passing, token passing,network transmission, or the like.

Furthermore, embodiments may be implemented by hardware, software,firmware, middleware, microcode, hardware description languages, or anycombination thereof. When implemented in software, firmware, middlewareor microcode, the program code or code segments to perform the necessarytasks (e.g., a computer-program product) may be stored in acomputer-readable or machine-readable medium. A processor(s) may performthe necessary tasks.

Some embodiments described herein use approaches to collecting andanalyzing driving data similar to the approaches described in U.S. Pat.No. 10,067,157, issued Sep. 4, 2018, entitled “METHODS AND SYSTEMS FORSENSOR-BASED VEHICLE ACCELERATION DETERMINATION” (“the '157 patent”),U.S. Pat. No. 9,892,363, issued Feb. 13, 2018, entitled “METHODS ANDSYSTEMS FOR SENSOR-BASED DRIVING DATA COLLECTION” (“the '363 patent”),U.S. Pat. No. 10,231,093, issued Mar. 12, 2019, entitled “METHODS ANDSYSTEMS FOR DRIVER IDENTIFICATION” (“the '093 patent”), U.S. Pat. No.10,054,446, issued Aug. 21, 2018, entitled “METHODS AND SYSTEMS FORCOMBINING SENSOR DATA TO MEASURE VEHICLE MOVEMENT” (“the '446 patent”),the contents of which patents and applications are incorporated byreference herein in their entireties for all purposes.

FIG. 1 is a system diagram illustrating a system 100 for detecting andscoring driving data according to some embodiments. System 100 includesa mobile device 101 having a number of different components. The mobiledevice 101 may include a sensor data block 105, a data processing block120, a data transmission block 130, and optionally a notification block140. The sensor data block 105 includes data collection sensors as wellas data collected from these sensors that are available to mobile device101. This can include external devices connected via Bluetooth, USBcable, etc.

The data processing block 120 may include a processor 122, a memory 124,and a storage 126. The processor 122 may be a microprocessor, amicrocontroller, of other programmable device. The memory 124 may beconfigured to store instructions executed by the processor and dataoperated on by the processor. Results of manipulations performed on thedata obtained from the sensor data block 105 by processor 122 may bestored in the storage 126. The manipulations may include, but are notlimited to, analyzing, characterizing, subsampling, filtering,reformatting, etc.

The data transmission block 130 may include a wireless transceiver 132,a cellular transceiver 134, and direct transmission capability, forexample, using a cable. The data transmission block 130 may providetransmission of the data from the mobile device 101 to an externaldevice and vice versa. In some implementations, the external device maybe a computing device. The external device may be configured to storeand manipulate the data obtained from sensor data block 105. Theexternal computing device can be, for example, a server 150. Server 150can comprise its own processor 152 and storage 156.

The notification block 140 may report the results of analysis of sensordata performed by the data processing block 120 to a user of the mobiledevice 101 via a display (not shown). For example, the notificationblock 140 may display or otherwise report a transportation modedetermination for a trip to a user of the mobile device 101. Thetransportation mode determination may be performed by the processor 122of mobile device 101 in some embodiments. In some embodiments, thetransportation mode determination may be performed by the server 150, asdescribed further herein with respect to FIG. 2 .

Some embodiments are described using examples where driving data iscollected using mobile devices 101, and these examples are not limitedto any particular mobile device. As examples, a variety of mobiledevices including sensors such as accelerometers 112, magnetometers 114,gyroscopes 116, compasses 119, barometers 113, location determinationsystems such as global positioning system (GPS) receivers 110,communications capabilities, and the like are included within the scopeof the present disclosure. Exemplary mobile devices include smartwatches, fitness monitors, Bluetooth headsets, tablets, laptopcomputers, smart phones, music players, movement analysis devices, andother suitable devices. Given the description herein, many variations,modifications, and alternatives for the implementation of embodimentscan be recognized.

To collect data associated with the driving behavior of a driver, one ormore sensors on mobile device 101 (e.g., the sensors of the sensor datablock 105) are operated close in time to a period when mobile device 101is with the driver when operating a vehicle—also termed herein “a drive”or “a trip.” With many mobile devices 101, the sensors used to collectdata are components of the mobile device 101, and use power resourcesavailable to the mobile device 101 components, e.g., mobile devicebattery power and/or a data source external to the mobile device 101.Data may be similarly collected and analyzed to determine if a trip ismade on other transportation modes.

Some embodiments use settings of a mobile device to enable differentfunctions described herein. For example, in Apple iOS, and/or AndroidOS, having certain settings enabled can enable certain functions ofembodiments. For some embodiments, having location services enabledallows the collection of location information from the mobile device(e.g., collected by global positioning system (GPS) sensors, andenabling background app refresh allows some embodiments to execute inthe background, collecting and analyzing driving data even when theapplication is not executing. In some implementations, alerts areprovided or surfaced using notification block 140 while the applicationis running in the background since the trip capture can be performed inthe background.

FIG. 2 shows a system 200 for collecting driving data that can include aserver 201 that communicates with the mobile device 101. The server 201may be the same or a different server than the server 150 of FIG. 1 . Insome embodiments, the server 201 may provide functionality usingcomponents including, but not limited to a vector analyzer 258, a vectordeterminer 259, an external information receiver 212, a classifier 214,a data collection frequency adjustment engine 252, a driver detectionengine 254, and a transportation mode determination engine 290. Thesecomponents may be executed by processors (not shown) in conjunction withmemory (not shown). The server 201 may also include a data storage 256.It is important to note that, while not shown, one or more of thecomponents shown operating within the server 201 can operate fully orpartially within the mobile device 101, and vice versa.

To collect data associated with the driving behavior of a driver (or thetransportation mode of a passenger), one or more sensors on the mobiledevice 101 (e.g., the sensors of sensor data block 105) may be operatedclose in time to a period when the mobile device 101 is with the user ina vehicle—also termed herein “a drive” or “a trip”. Once the mobiledevice sensors have collected data (and/or in real time), someembodiments analyze the data to determine acceleration vectors for thevehicle, as well as different features of the trip. For example, thedriver detection engine 254 may apply one or more processes to the datato determine whether the user of the mobile device 101 is a driver ofthe vehicle. Other examples are processes to detect and classify drivingfeatures using the classifier 214, and determine acceleration vectorsusing the vector analyzer 258 and the vector determiner 259. In someembodiments, external data (e.g., weather) can be retrieved andcorrelated with collected driving data.

As discussed herein, some embodiments can transform collected sensordata (e.g., driving data collected using the sensor data block 105) intodifferent results, including, but not limited to, analysis anddetermination of a transportation mode using the transportation modedetermination engine 290. Examples of collecting driving data usingsensors of a mobile device are described herein. Examples of analyzingcollected driving data to detect a transportation mode are alsodescribed herein. Notifications of transportation mode, such as displayof a finding of “bus,” “car,” “train,” “plane,” etc., can be made viathe notification block 140 of the mobile device 101. The transportationmode may be used to adjust the frequency of data collected by the sensordata block 105 in some embodiments, as adjusted by the data collectionfrequency adjustment engine 252. The data collection frequencyadjustment engine 252 may be in communication with the mobile device 101to cause the sensor data block 105 to collect data more frequently, lessfrequently, or at the same frequency, as described further herein withrespect to the following figures.

Although shown and described as being contained within the server 201,which can be remote from the mobile device 101, it is contemplated thatany or all of the components of the server 201 may instead beimplemented within the mobile device 101, and vice versa. It is furthercontemplated that any or all of the functionalities described herein maybe performed during a drive, in real time, or after a trip.

FIG. 3 is a block diagram of a protocol stack 300 that may beimplemented by the mobile device 101 in accordance with someembodiments. The mobile device 101 may implement the protocol stack tocommunicate with any of the other systems described herein, such as theserver 150 and/or the server 201. The protocol stack 300 may include oneor more of seven layers: an application layer 307, a presentation layer306, a session layer 305, a transport layer 304, a network layer 303, adata link layer 302, and a physical link layer 301. Together, theseseven layers may represent a model, such as an Open SystemsInterconnection (OSI) model. The OSI model of FIG. 3 may characterizethe communication functions of the described systems. Although shown anddescribed as having seven layers, it is contemplated that the protocolstack 300 may include more or fewer layers to perform less, the same, oradditional functions.

According to the OSI model, the application layer 307 may interact witha user (e.g., via receiving user inputs and presenting outputs) andsoftware applications implementing a communication component. Theapplication layer 307 may synchronize communication between systems anddetermine resource availability. The application layer 307 may beapplication-specific, in that the specific functions dependent on theparticular application being executed by the mobile device 101.

For example, the application layer 307 may execute an applicationprogramming interface (API) 310 which in turn may execute the processes(e.g., the method 400 illustrated in FIG. 4 ) of the disclosure. API 610may be executed entirely at the application layer 307. API 310 may be incommunication with remote storage 325, such as the storage 156 of theserver 150. In some embodiments, data collected by the sensors 320 maybe stored in the remote storage 325.

The presentation layer 306 may translate between application and networkformats. Various applications and networks may implement differentsyntaxes and semantics. Thus, the presentation layer 306 may transformdata from the network into a form that the application accepts. Thepresentation layer 306 may also format and encrypt data from theapplication to be sent on a network.

The session layer 305 may control connections between the systems andother devices and/or servers, as described herein. The session layer 305may establish the connections, manage the connections, and terminate theconnections used to communicate between the devices.

The transport layer 304 may provide techniques for performing quality ofservice functions during transfers of data between devices. Thetransport layer 304 may provide error control. For example, thetransport layer 304 may keep track of data being transmitted and mayretransmit any communications that fail. In addition, the transportlayer 304 may provide an acknowledgment of successful data transmissionand send the next data to be transmitted in a synchronous fashion if noerrors occurred.

The network layer 303 may provide the means of transferring the data toand from the systems over a network. The source node and destinationnode of the systems may each have an address which permits the other totransfer data to it by providing the address with the data. The networklayer 303 may also perform routing functions that allow it to adetermine a path between the source node and destination node, possiblythrough other nodes.

The data link layer 302 may define and provide the link between adirectly and physically connected source node and destination node. Thedata link layer 302 may further detect and correct errors occurring atthe physical link layer 301. In some embodiments, the data link layer302 may include two sublayers: a media access control (MAC) layer thatmay control how devices in the network gain access to data and gainpermission to transmit the data, and a logical link control (LLC) layerthat may identify network layer 303 protocols and encapsulate them.

The physical link layer 301 may include one or more sensors 320. Thesensors 320 may include, for example, an accelerometer, a compass, agyroscope, a magnetometer, a GPS, and/or the like. The physical linklayer 301 may further include one or more input devices (not shown),such as a keyboard, a mouse, a trackpad, a trackball, a touchscreendisplay, and/or any other device capable of receiving user input. Thephysical link layer 301 may further include local storage 315. In someembodiments, data collected by the sensors 320 may be stored in localstorage 315. The physical link layer 301 may define the electrical andphysical specifications of the data. The physical link layer 301 mayprovide a physical medium for storing unstructured raw data to betransmitted and received.

FIG. 4 is a flowchart illustrating a transportation mode determinationmethod 400 according to some embodiments. At block 405, magnetometerdata may be acquired. A magnetometer of a mobile device may be operatedduring a trip in a vehicle to acquire magnetometer data with respect toone or more frequencies. The magnetometer may be, for example, themagnetometer 114 of FIG. 1 . The mobile device may be, for example, themobile device 101 of FIG. 1 and/or FIG. 2 . The magnetometer may beincluded in one or more sensors of the mobile device. In someembodiments, the magnetometer data may be collected at a high frequency,such as 50 Hz or another data collection frequency.

At block 410, vehicle speed data may be acquired from the mobile device.The vehicle speed data may be acquired using a sensor of the one or moresensors of the mobile device. The vehicle speed data may be acquired,for example, from a GPS receiver (such as the GPS receiver 110 of FIG. 1), from an accelerometer (such as the accelerometer 112 of FIG. 1 ),and/or the like.

At block 415, the magnetometer data may be correlated to the vehiclespeed data to separate the magnetometer data into one or more groupings.For example, the processor of the mobile device may cause themagnetometer data to be separated into groupings based on the vehiclespeed data acquired by the one or more sensors of the mobile device atthe time the magnetometer data was acquired. The groupings of themagnetometer data may be formed based on ranges of vehicle speed, forexample, magnetometer data acquired during a vehicle speed range of25-35 mph, magnetometer data acquired during a vehicle speed range of35-45 mph, magnetometer data acquired during a vehicle speed range of45-55 mph, magnetometer data acquired during a vehicle speed range of55-65 mph, magnetometer data acquired during a vehicle speed range of65-75 mph, etc.).

At block 420, spectral analysis may be performed on a magnitude of themagnetometer data for each grouping. The processor of the mobile devicemay cause spectral analysis to be performed on the magnetometer data.Spectral analysis may analyze the magnetometer data with respect tofrequency for each of the speed groupings. Once spectral analysis isperformed, at block 425, an energy may be calculated for each of the oneor more frequencies using the spectral analysis. For example, theprocessor of the mobile device may cause the energy for each frequencycomponent of the magnetometer data to be calculated.

At block 430, the energy for each of the one or more frequencycomponents may be compared to a baseline value 427 to generate an energydifference. The baseline value 427 may be the energy at each frequencycomponent associated with different modes of transportation. Forexample, a train may have a certain energy at a certain frequencycomponent, a bus may have a different energy at the certain frequencycomponent, a car may have still another energy at the certain frequencycomponent, and so forth. The processor of the mobile device may causethe energy at each frequency component as calculated to be compared tothe energies of the different transportation modes at the same frequencycomponent as the measurement.

At block 435, a transportation mode type may be assigned to the vehiclebased on the difference. The transportation mode associated with thesmallest difference in energy at a majority or a threshold number offrequencies may be assigned. The processor of the mobile device maydetermine the difference between the measured energy values and thebaseline values for the different transportation modes at correspondingfrequency components. The processor may determine the transportationmode having the smallest difference in energy from the measured valuesat a specified number of frequency components as the transportation modetype to be assigned.

As discussed further herein, the type of vehicle may be, for example, acar, a train, a bus, a ferry, a subway, an airplane, and/or the like. Ifthe type of vehicle is a car, the method may, in some embodiments,further include operating the one or more sensors of the mobile deviceat a first frequency before assigning the type to the vehicle, andoperating the one or more sensors at a second frequency higher than thefirst frequency after assigning the type to the vehicle. In other words,data may be collected from the one or more sensors more frequently if itis determined that the mobile device is in a car in order to performfurther analysis. Further analysis of the sensor data may include driveridentification, driving behavior analysis, mobile device usage analysis,etc.

If the type of vehicle is other than a car, the method may, in someembodiments, further include operating the one or more sensors of themobile device at a first frequency before assigning the type to thevehicle, and operating the one or more sensors at a second frequencylower than the first frequency after assigning the type to the vehicle.In some embodiments, the method may further include operating the one ormore sensors of the mobile device at a first frequency before assigningthe type to the vehicle, and disabling the one or more sensors afterassigning the type to the vehicle. The one or more sensors may bedisabled or operated at a lower frequency if the type of the vehicle isnot a car, since the sensor data may not be relevant to the drivingbehavior of the user of the mobile device.

In some embodiments, the sensors may continue to operate at a reducedfrequency and/or be disabled until a change of speed is detected by asensor of the mobile device. For example, if a vehicle is identified asa train traveling at a speed of 70 mph and a speed of 0 mph is detectedfollowed by a speed of 45 mph, the sensors may begin to operate morefrequently in order to make a new transportation mode determination. Inother words, the process may restart at block 405.

While the operations at blocks 415-435 of the above method 400 areexplained using the processor of the mobile device (e.g., the processor122), it should be understood that the operations at blocks 415-435 canalso be performed at a server (e.g., the server 201). Alternatively, theoperations at blocks 415-435 may be performed by a combination of theprocessor of the mobile device and the server.

It should be appreciated that the specific steps illustrated in FIG. 4provide a particular method for transportation mode determinationaccording to an embodiment of the present invention. Other sequences ofsteps may also be performed according to alternative embodiments. Forexample, alternative embodiments of the present invention may performthe steps outlined above in a different order. Moreover, the individualsteps illustrated in FIG. 4 may include multiple sub-steps that may beperformed in various sequences as appropriate to the individual step.Furthermore, additional steps may be added or removed depending on theparticular applications. One of ordinary skill in the art wouldrecognize many variations, modifications, and alternatives.

The method 400 may be embodied on a non-transitory computer readablemedium, for example, but not limited to, the memory 124 or othernon-transitory computer readable medium known to those of skill in theart, having stored therein a program including computer executableinstructions for making a processor, computer, or other programmabledevice execute the operations of the methods.

FIG. 5 is a plot 500 of power versus frequency at various speeds of acar as measured by a magnetometer of a mobile device according to someembodiments. FIG. 6 is a plot 600 of power versus frequency at variousspeeds of a bus as measured by a magnetometer of a mobile deviceaccording to some embodiments. FIG. 7 is a plot 700 of power versusfrequency at various speeds of a train 700 as measured by a magnetometerof a mobile device according to some embodiments. In FIGS. 5-7 , thex-axis represents the Fourier transformed frequency components of themagnetometer signal sampled at 50 Hz. This data may be used for baselinevalues 327, according to some embodiments.

As can be seen in FIGS. 5-7 , the power at similar frequency componentsfor a car, a bus, and a train may be highly variable across thedifferent modes of transportation. Thus, by comparing a magnetometerreading at a given frequency component and speed to the powers for thatfrequency component and speed in FIGS. 5-7 , a difference between thereading and the baseline values may be generated. The transportationmode associated with the lowest difference may be assigned as the typeof vehicle associated with the trip.

FIG. 8A is a plot 800A of power versus frequency at a speed range of 25to 35 miles per hour for a car, a bus, and a train as measured by amagnetometer of a mobile device according to some embodiments. In FIG.8A, the x-axis represents the Fourier transformed frequency componentsof the magnetometer signal sampled at 50 Hz. FIG. 8A may be referencedfor baseline values for measured speeds of 25 to 35 mph. As shown inFIG. 8A, the power at similar frequencies for a car, a bus, and a trainmay be different. Thus, by comparing a magnetometer reading at a givenfrequency component and at a speed of 25 to 35 mph, a difference betweenthe reading and the baseline values may be generated. The transportationmode associated with the lowest difference may be assigned as the typeof vehicle associated with the trip. Similarly, FIG. 13A is a plot ofpower versus frequency at a speed range of 25 to 35 miles per hour for acar, a bus, and a train as measured by a magnetometer of a mobile deviceaccording to some embodiments. In FIG. 13A, the x-axis represents theFourier transformed frequency components of the magnetometer signalsampled at 50 Hz.

FIG. 8B is a plot 800B of power versus frequency at a speed range of 40to 50 miles per hour for a car, a bus, and a train as measured by amagnetometer of a mobile device according to some embodiments. In FIG.8B, the x-axis represents the Fourier transformed frequency componentsof the magnetometer signal sampled at 50 Hz. FIG. 8B may be referencedfor baseline values for measured speeds of 40 to 50 mph. As shown inFIG. 8B, the power at similar frequencies for a car, a bus, and a trainmay be different. Thus, by comparing a magnetometer reading at a givenfrequency component and at a speed of 40 to 50 mph, a difference betweenthe reading and the baseline values may be generated. The transportationmode associated with the lowest difference may be assigned as the typeof vehicle associated with the trip. Similarly, FIG. 13B is a plot ofpower versus frequency at a speed range of 40 to 50 miles per hour for acar, a bus, and a train as measured by a magnetometer of a mobile deviceaccording to some embodiments. In FIG. 13B, the x-axis represents theFourier transformed frequency components of the magnetometer signalsampled at 50 Hz.

FIG. 8C is a plot 800C of power versus frequency at a speed range of 60to 70 miles per hour for a car, a bus, and a train as measured by amagnetometer of a mobile device according to some embodiments. In FIG.8C, the x-axis represents the Fourier transformed frequency componentsof the magnetometer signal sampled at 50 Hz. FIG. 8C may be referencedfor baseline values for measured speeds of 60 to 70 mph. As shown inFIG. 8C, the power at similar frequencies for a car, a bus, and a trainmay be different. Thus, by comparing a magnetometer reading at a givenfrequency component and at a speed of 60 to 70 mph, a difference betweenthe reading and the baseline values may be generated. The transportationmode associated with the lowest difference may be assigned as the typeof vehicle associated with the trip. Similarly, FIG. 13C is a plot ofpower versus frequency at a speed range of 60 to 70 miles per hour for acar, a bus, and a train as measured by a magnetometer of a mobile deviceaccording to some embodiments. In FIG. 13C, the x-axis represents theFourier transformed frequency components of the magnetometer signalsampled at 50 Hz.

FIG. 9 is a plot 900 illustrating principle component analysis (PCA) offeatures extracted from car and bus trips according to some embodiments.FIG. 9 further illustrates differences between GPS speed groups fordifferent vehicles can be seen when the spectral power features areprojected to a lower dimensional space.

FIG. 10 is a plot 1000 of acceleration versus frequency for a bus atvarious speeds as measured by an accelerometer of a mobile deviceaccording to some embodiments. FIG. 11 is a plot 1100 of accelerationversus frequency for a car at various speeds as measured by anaccelerometer of a mobile device according to some embodiments. FIG. 12is a plot 1200 of acceleration versus frequency for a train at variousspeeds as measured by an accelerometer of a mobile device according tosome embodiments. In FIGS. 10-12 , the x-axis represents the Fouriertransformed frequency components of the accelerometer signal sampled at50 Hz. As shown, acceleration data may be similar across different modesof transportation.

As illustrated by FIGS. 10-12 , while differences exist in theaccelerometer spectral features for the three transit modes (i.e., bus,car, and train), the differences may not be as significant as thedifferences seen in magnetometer data. However, using both magnetometerand accelerometer spectral features may result in more accurateclassification of transit modes. For example, it may be possible tobuild an algorithm for transit mode classification that consumesmagnetometer and accelerometer spectral features. The combination ofmagnetometer and accelerometer spectral features may provide moreaccurate classification than spectral features obtained from amagnetometer or an accelerometer as standalone sensors.

As noted, the computer-readable medium may include transient media, suchas a wireless broadcast or wired network transmission, or storage media(that is, non-transitory storage media), such as a hard disk, flashdrive, compact disc, digital video disc, Blu-ray disc, or othercomputer-readable media. The computer-readable medium may be understoodto include one or more computer-readable media of various forms, invarious examples.

In the foregoing description, aspects of the application are describedwith reference to specific embodiments thereof, but those skilled in theart will recognize that the invention is not limited thereto. Thus,while illustrative embodiments of the application have been described indetail herein, it is to be understood that the inventive concepts may beotherwise variously embodied and employed, and that the appended claimsare intended to be construed to include such variations, except aslimited by the prior art. Various features and aspects of theabove-described invention may be used individually or jointly. Further,embodiments can be utilized in any number of environments andapplications beyond those described herein without departing from thebroader spirit and scope of the specification. The specification anddrawings are, accordingly, to be regarded as illustrative rather thanrestrictive. For the purposes of illustration, methods were described ina particular order. It should be appreciated that in alternateembodiments, the methods may be performed in a different order than thatdescribed.

Where components are described as performing or being “configured to”perform certain operations, such configuration can be accomplished, forexample, by designing electronic circuits or other hardware to performthe operation, by programming programmable electronic circuits (e.g.,microprocessors, or other suitable electronic circuits) to perform theoperation, or any combination thereof.

The various illustrative logical blocks, modules, circuits, andalgorithm steps described in connection with the embodiments disclosedherein may be implemented as electronic hardware, computer software,firmware, or combinations thereof. To clearly illustrate thisinterchangeability of hardware and software, various illustrativecomponents, blocks, modules, circuits, and steps have been describedabove generally in terms of their functionality. Whether suchfunctionality is implemented as hardware or software depends upon theparticular application and design constraints imposed on the overallsystem. Skilled artisans may implement the described functionality invarying ways for each particular application, but such implementationdecisions should not be interpreted as causing a departure from thescope of the present invention.

The techniques described herein may also be implemented in electronichardware, computer software, firmware, or any combination thereof. Suchtechniques may be implemented in any of a variety of devices such asgeneral purposes computers, wireless communication device handsets, orintegrated circuit devices having multiple uses including application inwireless communication device handsets and other devices. Any featuresdescribed as modules or components may be implemented together in anintegrated logic device or separately as discrete but interoperablelogic devices. If implemented in software, the techniques may berealized at least in part by a computer-readable data storage mediumcomprising program code including instructions that, when executed,performs one or more of the methods described above. Thecomputer-readable data storage medium may form part of a computerprogram product, which may include packaging materials. Thecomputer-readable medium may comprise memory or data storage media, suchas random access memory (RAM) such as synchronous dynamic random accessmemory (SDRAM), read-only memory (ROM), non-volatile random accessmemory (NVRAM), electrically erasable programmable read-only memory(EEPROM), FLASH memory, magnetic or optical data storage media, and thelike. The techniques additionally, or alternatively, may be realized atleast in part by a computer-readable communication medium that carriesor communicates program code in the form of instructions or datastructures and that can be accessed, read, and/or executed by acomputer, such as propagated signals or waves.

The program code may be executed by a processor, which may include oneor more processors, such as one or more digital signal processors(DSPs), general purpose microprocessors, an application specificintegrated circuits (ASICs), field programmable logic arrays (FPGAs), orother equivalent integrated or discrete logic circuitry. Such aprocessor may be configured to perform any of the techniques describedin this disclosure. A general purpose processor may be a microprocessor;but in the alternative, the processor may be any conventional processor,controller, microcontroller, or state machine. A processor may also beimplemented as a combination of computing devices, e.g., a combinationof a DSP and a microprocessor, a plurality of microprocessors, one ormore microprocessors in conjunction with a DSP core, or any other suchconfiguration. Accordingly, the term “processor,” as used herein mayrefer to any of the foregoing structure, any combination of theforegoing structure, or any other structure or apparatus suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated software modules or hardware modules configured for encodingand decoding, or incorporated in a combined video encoder-decoder(CODEC).

The examples and embodiments described herein are for illustrativepurposes only. Various modifications or changes in light thereof will beapparent to persons skilled in the art. These are to be included withinthe spirit and purview of this application, and the scope of theappended claims, which follow.

1. A method comprising: obtaining motion data from one or more sensorsof a mobile device during a trip; acquiring speed data from a sensor ofthe one or more sensors of the mobile device during the trip;correlating, by a processor, the motion data to the speed data toseparate the motion data into one or more groupings based on the speeddata; performing, by the processor, a spectral analysis on magnitudes ofthe motion data for each of the one or more groupings to obtain a set offrequency components; calculating, by the processor, an energy for eachfrequency component of the set of frequency components obtained from thespectral analysis; comparing, by the processor, the energy of eachfrequency component of the set of frequency components to one or morebaseline values for each frequency component to generate a set ofdifferences; and determining, by the processor, a transportation modeused for the trip based on one or more differences from the set ofdifferences.
 2. The method of claim 1, wherein the transportation modeis a car.
 3. The method of claim 2, further comprising: operating theone or more sensors at a first sampling frequency before determining thetransportation mode; and operating the one or more sensors at a secondsampling frequency after determining the transportation mode, whereinthe second sampling frequency is higher than the first samplingfrequency.
 4. The method of claim 1, wherein the transportation mode isone of a bus, train, or subway.
 5. The method of claim 4, furthercomprising: operating the one or more sensors at a first samplingfrequency before determining the transportation mode; and operating theone or more sensors at a second sampling frequency after determining thetransportation mode, wherein the second sampling frequency is lower thanthe first sampling frequency.
 6. The method of claim 4, furthercomprising: operating the one or more sensors at a first samplingfrequency before determining the transportation mode; and disabling theone or more sensors after determining the transportation mode.
 7. Themethod of claim 1, wherein the one or more sensors of the mobile deviceinclude a magnetometer and the motion data includes magnetometer data.8. The method of claim 1, wherein the one or more sensors of the mobiledevice include an accelerometer and the motion data includesaccelerometer data.
 9. The method of claim 1, wherein each baselinevalue of the one or more baseline values is associated with atransportation mode type of a plurality of transportation mode types anda frequency component of the set of frequency components.
 10. The methodof claim 1, wherein each difference of the set of differences isassociated with a transportation mode type of a plurality oftransportation mode types, and the method further comprises: determiningthat differences of the set of differences associated with a firsttransportation mode type are smaller than differences of the set ofdifferences associated with other transportation mode types; anddetermining that the first transportation mode type was thetransportation mode used for the trip in response.
 11. A system,comprising: one or more sensors of a mobile device; and a processorconfigured to perform operations including: obtaining motion data fromthe one or more sensors of the mobile device during a trip; acquiringspeed data from a sensor of the one or more sensors of the mobile deviceduring the trip; correlating the motion data to the speed data toseparate the motion data into one or more groupings based on the speeddata; performing a spectral analysis on magnitudes of the motion datafor each of the one or more groupings to obtain a set of frequencycomponents; calculating an energy for each frequency component of theset of frequency components obtained from the spectral analysis;comparing the energy of each frequency component of the set of frequencycomponents to one or more baseline values for each frequency componentto generate a set of differences; and determining a transportation modeused for the trip based on one or more differences from the set ofdifferences.
 12. The system of claim 11, wherein the processor isseparate from the mobile device.
 13. The system of claim 11, wherein theone or more sensors of the mobile device include: a magnetometer and themotion data includes magnetometer data; an accelerometer and the motiondata includes accelerometer data; or both.
 14. The system of claim 11,wherein the processor is further configured to perform operationsincluding: operating the one or more sensors at a first samplingfrequency before determining the transportation mode; and operating theone or more sensors at a second sampling frequency in response todetermining the transportation mode.
 15. The system of claim 14,wherein: the second sampling frequency is lower than the first samplingfrequency responsive to determining that the transportation mode is oneof a bus, a train, or a subway; and the second sampling frequency ishigher than the first sampling frequency responsive to determining thatthe transportation mode is a car.
 16. A non-transitory computer readablemedium comprising instructions that, when executed by one or moreprocessors, cause the one or more processors to perform operationscomprising: obtaining motion data from one or more sensors of a mobiledevice during a trip; acquiring speed data from a sensor of the one ormore sensors of the mobile device during the trip; correlating themotion data to the speed data to separate the motion data into one ormore groupings based on the speed data; performing a spectral analysison magnitudes of the motion data for each of the one or more groupingsto obtain a set of frequency components; calculating an energy for eachfrequency component of the set of frequency components obtained from thespectral analysis; comparing the energy of each frequency component ofthe set of frequency components to one or more baseline values for eachfrequency component to generate a set of differences; and determining atransportation mode used for the trip based on one or more differencesfrom the set of differences.
 17. The non-transitory computer readablemedium as defined in claim 16, wherein the one or more sensors of themobile device include: a magnetometer and the motion data includesmagnetometer data; an accelerometer and the motion data includesaccelerometer data; or both.
 18. The non-transitory computer readablemedium as defined in claim 16, wherein each difference of the set ofdifferences is associated with a transportation mode type of a pluralityof transportation mode types, and the operations further comprise:determining that differences of the set of differences associated with afirst transportation mode type are smaller than differences of the setof differences associated with other transportation mode types; anddetermining that the first transportation mode type was thetransportation mode used for the trip in response.
 19. Thenon-transitory computer readable medium as defined in claim 16, whereinthe operations further comprise: operating the one or more sensors at afirst sampling frequency before determining the transportation mode; andoperating the one or more sensors at a second sampling frequency inresponse to determining the transportation mode.
 20. The non-transitorycomputer readable medium as defined in claim 19, wherein: the secondsampling frequency is lower than the first sampling frequency responsiveto determining that the transportation mode is one of a bus, a train, ora subway; and the second sampling frequency is higher than the firstsampling frequency responsive to determining that the transportationmode is a car.